]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shell/stack: Ignore hidden children for focus navigation
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 19 Feb 2020 16:30:15 +0000 (17:30 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 24 Feb 2020 12:29:44 +0000 (12:29 +0000)
ShellStack implements custom focus navigation, and will only ever
navigate into its top-most child. That kind of makes sense as long
as that child is actually visible, but not when it is hidden.

Descend into the stack to look for a focusable child instead.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/2210

src/shell-stack.c

index 7fc7609252d843983cf422a5c6a3767b9524d5e8..7f4cb5564be0d55567a3242f4177c834c81afc9a 100644 (file)
@@ -170,6 +170,8 @@ shell_stack_navigate_focus (StWidget         *widget,
     }
 
   top_actor = clutter_actor_get_last_child (CLUTTER_ACTOR (widget));
+  while (top_actor && !clutter_actor_is_visible (top_actor))
+    top_actor = clutter_actor_get_previous_sibling (top_actor);
   if (ST_IS_WIDGET (top_actor))
     return st_widget_navigate_focus (ST_WIDGET (top_actor), from, direction, FALSE);
   else